const express = require('express')
const app = express()
const path = require('path')
const fs = require('fs')
const port = 3000
const dev_dir = 'dist_pro'

app.use(express.static(path.join(__dirname, dev_dir)))

app.get('*', (req, res) => {
    const indexPath = path.join(__dirname, dev_dir, 'index.html')
    res.sendFile(indexPath)
})


app.listen(port, () => {
    console.log(`app listening on  http://localhost:${port}`)
})